package io.file;

import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.io.*;
import java.util.Scanner;

public class ReadTest {

    private static final Logger logger = LoggerFactory.getLogger(ReadTest.class);

    public static void main(String[] args) {
        Scanner scanner1 = new Scanner(System.in);
        int x = scanner1.nextInt();
        String[] s = new String[x];
        for (int i = 0; i < x; i++) {
            Scanner scanner = new Scanner(System.in);
            s[i] = scanner.next();
        }
        for (int y = 0; y < x; y++) {
            logger.info(s[y]);
        }
    }

    @Test
    public void test1() {
        Scanner scanner1 = new Scanner(System.in);
        int x = scanner1.nextInt();
        String[] s = new String[x];
        for (int i = 0; i < x; i++) {
            Scanner scanner = new Scanner(System.in);
            s[i] = scanner.next();
        }
    }


    @Test
    public void test3() {
        File file1 = new File("./home/copydir");
        File file2 = new File("./user");
        try (FileOutputStream file = new FileOutputStream(file2); BufferedOutputStream bos = new BufferedOutputStream(file); FileInputStream fis = new FileInputStream(file1)) {
            byte[] buf = new byte[2048];
            while (fis.read(buf) > 0) {
                bos.write(buf);
            }
        } catch (Exception e) {
            logger.error("Error Occur:{}", e.getMessage());
        }
    }


}
